#ifndef LANGUAGE_VIEW_H
#define LANGUAGE_VIEW_H

#include <QWidget>

QT_BEGIN_NAMESPACE
class QObject;
class QListView;
class QLineEdit;
class QSortFilterProxyModel;
class QButtonGroup;
class QPushButton;
class QModelIndex;
QT_END_NAMESPACE

class EditLanguageView;
class LanguageModel;
class SymbolModel;

class LanguageView : public QWidget
{
    Q_OBJECT
    
public:
    
    explicit LanguageView( QWidget * parent = 0 );
    
    void setLanguageModel( LanguageModel * model );
    LanguageModel * getLanguageModel()
    {
        return languageModel;
    }

    void setSymbolModel( SymbolModel * model );
    
    void setCurrent( const QModelIndex & index );
    
private slots:

    void currentChanged( const QModelIndex & current, const QModelIndex & previous );
    
signals:

    void symbolIndexChanged( const QModelIndex & model_index );

private:

    QLayout * createLanguageElementList();

    QListView
        * listView;
    QLineEdit
        * searchLineEdit;
    EditLanguageView
        * editLanguageView;
    LanguageModel
        * languageModel;
    SymbolModel
        * symbolModel;
    QSortFilterProxyModel
        * filteredModel;
};
#endif